package com.minimalist.common.entity.lindi.vo.subsidyapplicationpaynotice;

import cn.hutool.core.date.DatePattern;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.minimalist.common.entity.lindi.vo.subsidyapplicationfile.LindiSubsidyApplicationFileVO;
import com.minimalist.common.entity.lindi.vo.subsidyapplicationpayrecord.LindiSubsidyApplicationPayRecordVO;
import com.minimalist.common.entity.lindi.vo.subsidyapplicationtownpayment.LindiSubsidyApplicationTownPaymentVO;
import com.minimalist.common.utils.Update;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;

import java.io.Serial;
import java.io.Serializable;
import java.sql.Timestamp;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Objects;

/**
 * 林地指标交易平台_补贴申请交易通知 VO类
 *
 * @author 11987
 */
@Schema(name = "林地指标交易平台_补贴申请交易通知实体")
public class LindiSubsidyApplicationPayNoticeVO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    // ========== 基本信息 ==========

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "subsidyApplicationId", description = "补贴申请ID", type = "string")
    private Long subsidyApplicationId;

    @NotNull(message = "支付通知ID不能为空", groups = {Update.class})
    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "subsidyApplicationPayNoticeId", description = "支付通知ID", type = "string")
    private Long subsidyApplicationPayNoticeId;

    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    @Schema(name = "noticeDate", description = "通知时间", type = "string")
    private Timestamp noticeDate;

    @Schema(name = "payTitle", description = "支付通知标题", type = "string")
    private String payTitle;

    @Schema(name = "payExplain", description = "支付说明", type = "string")
    private String payExplain;

    @Schema(name = "remark", description = "备注", type = "string")
    private String remark;

    @Schema(name = "fileList", description = "文件列表，文件ID以,分割", type = "string")
    private String fileList;

    @Schema(name = "fileVOList", description = "文件VO列表", type = "array")
    private List<LindiSubsidyApplicationFileVO> fileVOList;

    @Schema(name = "townPaymentList", description = "镇街支付明细列表", type = "array")
    private List<LindiSubsidyApplicationTownPaymentVO> townPaymentList;

    @Schema(name = "payRecordList", description = "支付记录列表", type = "array")
    private List<LindiSubsidyApplicationPayRecordVO> payRecordList;

    // ========== 审计字段 ==========

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "createId", description = "创建人ID", type = "string")
    private Long createId;

    @Schema(name = "createName", description = "创建人姓名", type = "string")
    private String createName;

    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    @Schema(name = "createTime", description = "创建时间", type = "string")
    private LocalDateTime createTime;

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "updateId", description = "更新人ID", type = "string")
    private Long updateId;

    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    @Schema(name = "updateTime", description = "更新时间", type = "string")
    private LocalDateTime updateTime;

    public LindiSubsidyApplicationPayNoticeVO() {
    }

    public LindiSubsidyApplicationPayNoticeVO(Long subsidyApplicationId, Long subsidyApplicationPayNoticeId, Timestamp noticeDate, String payTitle, String payExplain, String remark, String fileList, List<LindiSubsidyApplicationFileVO> fileVOList, List<LindiSubsidyApplicationTownPaymentVO> townPaymentList, List<LindiSubsidyApplicationPayRecordVO> payRecordList, Long createId, String createName, LocalDateTime createTime, Long updateId, LocalDateTime updateTime) {
        this.subsidyApplicationId = subsidyApplicationId;
        this.subsidyApplicationPayNoticeId = subsidyApplicationPayNoticeId;
        this.noticeDate = noticeDate;
        this.payTitle = payTitle;
        this.payExplain = payExplain;
        this.remark = remark;
        this.fileList = fileList;
        this.fileVOList = fileVOList;
        this.townPaymentList = townPaymentList;
        this.payRecordList = payRecordList;
        this.createId = createId;
        this.createName = createName;
        this.createTime = createTime;
        this.updateId = updateId;
        this.updateTime = updateTime;
    }

    public Long getSubsidyApplicationId() {
        return subsidyApplicationId;
    }

    public void setSubsidyApplicationId(Long subsidyApplicationId) {
        this.subsidyApplicationId = subsidyApplicationId;
    }

    public Long getSubsidyApplicationPayNoticeId() {
        return subsidyApplicationPayNoticeId;
    }

    public void setSubsidyApplicationPayNoticeId(Long subsidyApplicationPayNoticeId) {
        this.subsidyApplicationPayNoticeId = subsidyApplicationPayNoticeId;
    }

    public Timestamp getNoticeDate() {
        return noticeDate;
    }

    public void setNoticeDate(Timestamp noticeDate) {
        this.noticeDate = noticeDate;
    }

    public String getPayTitle() {
        return payTitle;
    }

    public void setPayTitle(String payTitle) {
        this.payTitle = payTitle;
    }

    public String getPayExplain() {
        return payExplain;
    }

    public void setPayExplain(String payExplain) {
        this.payExplain = payExplain;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getFileList() {
        return fileList;
    }

    public void setFileList(String fileList) {
        this.fileList = fileList;
    }

    public List<LindiSubsidyApplicationFileVO> getFileVOList() {
        return fileVOList;
    }

    public void setFileVOList(List<LindiSubsidyApplicationFileVO> fileVOList) {
        this.fileVOList = fileVOList;
    }

    public List<LindiSubsidyApplicationTownPaymentVO> getTownPaymentList() {
        return townPaymentList;
    }

    public void setTownPaymentList(List<LindiSubsidyApplicationTownPaymentVO> townPaymentList) {
        this.townPaymentList = townPaymentList;
    }

    public List<LindiSubsidyApplicationPayRecordVO> getPayRecordList() {
        return payRecordList;
    }

    public void setPayRecordList(List<LindiSubsidyApplicationPayRecordVO> payRecordList) {
        this.payRecordList = payRecordList;
    }

    public Long getCreateId() {
        return createId;
    }

    public void setCreateId(Long createId) {
        this.createId = createId;
    }

    public String getCreateName() {
        return createName;
    }

    public void setCreateName(String createName) {
        this.createName = createName;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public Long getUpdateId() {
        return updateId;
    }

    public void setUpdateId(Long updateId) {
        this.updateId = updateId;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        LindiSubsidyApplicationPayNoticeVO that = (LindiSubsidyApplicationPayNoticeVO) o;
        return Objects.equals(subsidyApplicationId, that.subsidyApplicationId)
                && Objects.equals(subsidyApplicationPayNoticeId, that.subsidyApplicationPayNoticeId)
                && Objects.equals(noticeDate, that.noticeDate)
                && Objects.equals(payTitle, that.payTitle)
                && Objects.equals(payExplain, that.payExplain)
                && Objects.equals(remark, that.remark)
                && Objects.equals(fileList, that.fileList)
                && Objects.equals(fileVOList, that.fileVOList)
                && Objects.equals(townPaymentList, that.townPaymentList)
                && Objects.equals(payRecordList, that.payRecordList)
                && Objects.equals(createId, that.createId)
                && Objects.equals(createName, that.createName)
                && Objects.equals(createTime, that.createTime)
                && Objects.equals(updateId, that.updateId)
                && Objects.equals(updateTime, that.updateTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(subsidyApplicationId, subsidyApplicationPayNoticeId, noticeDate, payTitle, payExplain, remark, fileList, fileVOList, townPaymentList, payRecordList, createId, createName, createTime, updateId, updateTime);
    }

    @Override
    public String toString() {
        return "LindiSubsidyApplicationPayNoticeVO{" +
                "subsidyApplicationId=" + subsidyApplicationId +
                ", subsidyApplicationPayNoticeId=" + subsidyApplicationPayNoticeId +
                ", noticeDate=" + noticeDate +
                ", payTitle='" + payTitle + '\'' +
                ", payExplain='" + payExplain + '\'' +
                ", remark='" + remark + '\'' +
                ", fileList='" + fileList + '\'' +
                ", fileVOList=" + fileVOList +
                ", townPaymentList=" + townPaymentList +
                ", payRecordList=" + payRecordList +
                ", createId=" + createId +
                ", createName='" + createName + '\'' +
                ", createTime=" + createTime +
                ", updateId=" + updateId +
                ", updateTime=" + updateTime +
                '}';
    }

    public static Builder builder() {
        return new Builder();
    }

    public static class Builder {
        private Long subsidyApplicationId;
        private Long subsidyApplicationPayNoticeId;
        private Timestamp noticeDate;
        private String payTitle;
        private String payExplain;
        private String remark;
        private String fileList;
        private List<LindiSubsidyApplicationFileVO> fileVOList;
        private List<LindiSubsidyApplicationTownPaymentVO> townPaymentList;
        private List<LindiSubsidyApplicationPayRecordVO> payRecordList;
        private Long createId;
        private String createName;
        private LocalDateTime createTime;
        private Long updateId;
        private LocalDateTime updateTime;

        public Builder subsidyApplicationId(Long subsidyApplicationId) {
            this.subsidyApplicationId = subsidyApplicationId;
            return this;
        }

        public Builder subsidyApplicationPayNoticeId(Long subsidyApplicationPayNoticeId) {
            this.subsidyApplicationPayNoticeId = subsidyApplicationPayNoticeId;
            return this;
        }

        public Builder noticeDate(Timestamp noticeDate) {
            this.noticeDate = noticeDate;
            return this;
        }

        public Builder payTitle(String payTitle) {
            this.payTitle = payTitle;
            return this;
        }

        public Builder payExplain(String payExplain) {
            this.payExplain = payExplain;
            return this;
        }

        public Builder remark(String remark) {
            this.remark = remark;
            return this;
        }

        public Builder fileList(String fileList) {
            this.fileList = fileList;
            return this;
        }

        public Builder fileVOList(List<LindiSubsidyApplicationFileVO> fileVOList) {
            this.fileVOList = fileVOList;
            return this;
        }

        public Builder townPaymentList(List<LindiSubsidyApplicationTownPaymentVO> townPaymentList) {
            this.townPaymentList = townPaymentList;
            return this;
        }

        public Builder payRecordList(List<LindiSubsidyApplicationPayRecordVO> payRecordList) {
            this.payRecordList = payRecordList;
            return this;
        }

        public Builder createId(Long createId) {
            this.createId = createId;
            return this;
        }

        public Builder createName(String createName) {
            this.createName = createName;
            return this;
        }

        public Builder createTime(LocalDateTime createTime) {
            this.createTime = createTime;
            return this;
        }

        public Builder updateId(Long updateId) {
            this.updateId = updateId;
            return this;
        }

        public Builder updateTime(LocalDateTime updateTime) {
            this.updateTime = updateTime;
            return this;
        }

        public LindiSubsidyApplicationPayNoticeVO build() {
            return new LindiSubsidyApplicationPayNoticeVO(
                    subsidyApplicationId,
                    subsidyApplicationPayNoticeId,
                    noticeDate,
                    payTitle,
                    payExplain,
                    remark,
                    fileList,
                    fileVOList,
                    townPaymentList,
                    payRecordList,
                    createId,
                    createName,
                    createTime,
                    updateId,
                    updateTime
            );
        }
    }
}